<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/component/commonTagLib.jsp"%>
<!DOCTYPE html>
<html>
<head>
	<title><spring:message code="message.jieSuan.jiaoKuanTongZhiShu"/><spring:message code="message.jqGrid.cz.xiangQing"/></title>
	<%@ include file="/WEB-INF/component/commonCSS.jsp"%>
    <!--[if lt IE 9]>
        <script src="lib/js/html5shiv.min.js"></script>
        <script src="lib/js/respond.min.js"></script>
    <![endif]-->
 	<style type="text/css">
.title
{
font-size:35px;
font-weight:600;
text-align:center;
padding-top:10px;
padding-bottom:10px;
}
.settlement
{ 
font-size:17px;
float:left;
margin-left:15px;
}
.number
{ 
font-size:17px;
float:right;
margin-right:25px;
}

.mainbody
{
font-size:17px;
width:907px;
margin:0 auto;
margin-top:40px;
}
.zxUser
{ 
font-size:17px;
float:right;
margin-right:50px;
}
.underline{
	text-decoration:underline;
}
.ui-jqgrid-titlebar-close{
display: none;
}
.ui-jqgrid-caption.ui-widget-header
{
    height: 3px;
    padding-top: 0px;
    padding-bottom: 0px;
}
</style>
   
</head>
<body class="skin-blue-light sidebar-mini fixed skin-blue-light-frame">
<div class="container">
  <div class="title">湖北省基本药物货款结算平台缴款通知书</div>
  <div class="settlement">结算周期：<span class="underline"><fmt:formatDate value="${setPaynotice.schedule_beg_time}" pattern="yyyy-MM-dd" /> 至 <fmt:formatDate value="${setPaynotice.schedule_end_time}" pattern="yyyy-MM-dd" /></span></div>
  <div class="number">编号：<span  class="underline"><c:out value="${setPaynotice.notice_no}"></c:out> </span></div>
  <div class="mainbody">
  <div class="head"><span class="underline"><c:out value="${setAcctInfo.orgName}"></c:out></span>：</div>
	&nbsp;&nbsp;根据《湖北省基层医疗机构基本药物货款结算管理办法（试行）》，贵单位本次结算周期应缴基本药物集中采购货款金额为￥<span class="underline"><fmt:formatNumber value="${setPaynotice.amount}" pattern="0.00"/></span>元，如下表：
  </div>
							      <section class="content">
							        <div class=" box box-success">
							            <div class="box-body">
							                <div class="input">
							                	<div class="textalign1"><spring:message code="message.jieSuan.shangPinBianMa"/><spring:message code="message.yanZheng.maoHao"/></div>
							                        <div class="boxinput">
							                        <input type="text" class="textinput" id="goodsCode" placeholder="<spring:message code="message.jieSuan.shangPinBianMa"/>" />
							                    	</div>
							                    <div class="textalign" >
							                    <button type="button" class="btn btn-success btn-sm" onclick="gridSerch();" id="selectDicCompType"><spring:message code="message.button.seachSpacing"/></button>
							                </div>
							                </div>
							            </div>
							        </div>
							        <table class="jqgrid" id="gridlist"></table>
							    </section>
  <div class="mainbody" style="margin-top: 0px;">&nbsp;&nbsp;截止<span class="underline"><fmt:formatDate value="${setAcctInfo.availableAmtUpdDttm}" pattern="yyyy年MM月dd日" /></span>，
  	贵单位账户余额为￥<span class="underline"><fmt:formatNumber value="${setAcctInfo.outstandAmt}" pattern="0.00"/></span>元,
  	可用余额为￥<span class="underline"><fmt:formatNumber value="${setAcctInfo.availableAmt}" pattern="0.00"/></span>元。
  	<%-- 欠款为￥<span class="underline"><fmt:formatNumber value="${setAcctInfo.amount}" pattern="0.00"/></span>元。 --%>
  	本结算周期应缴款为￥<span class="underline"><fmt:formatNumber value="${setPaynotice.amount}" pattern="0.00"/></span>元，
  	请贵单位将以上货款缴存至<span class="underline"><c:out value="${setRelationship.fatherOrgName}"></c:out></span>会计核算中心账户。<br/>
  &nbsp;&nbsp;特此通知 </div>
</div>	
 <div class="zxUser">湖北省基本药物货款结算平台<br/><fmt:formatDate value="${setPaynotice.create_datetime}" pattern="yyyy年MM月dd日" /></div>
		<%@ include file="/WEB-INF/component/commonJS.jsp"%>
		<script type="text/javascript">
		   //绑定回车
		   $('#goodsCode').bind('keydown', function(event) { 
		       if (event.keyCode == "13") {
		           $('#selectDicCompType').click();
		       }
		   });	
		   $("#goodsCode").focus();//加载页面光标在第一个查询框内
		
		 
		$(function () {
			jQuery("#gridlist").jqGrid({
    			url: "${ctx}/setPaynotice/getSetPaynoticeDetailListzx.html",
    		    mtype: "POST",
    			datatype: "json",
    			postData:{
    				"noticeId" : "${setPaynotice.notice_id}"
    			},
    			autowidth: true,
    			shrinkToFit: false,
    			height: 155,
    		   	colNames:[
    		   	           '<spring:message code="message.jieSuan.shangPinBianMa"/>',
    		   	           '<spring:message code="message.jieSuan.caiGouJia"/>',
    		   	           '<spring:message code="message.jieSuan.caiGouShuLiang"/>', 
    		   	           '<spring:message code="message.jieSuan.daoHuoShuLiang"/>',
    		   	           '付款金额'
    		   	           ],
    		   	colModel:[
    			
    				{ name: 'goodsCode', width:200,align:"center" ,sortable:false},
    				{ name: 'proPrice', width:150, align:"right",sortable:false,
                 	   formatter:function(cellvalue, options, row){
                           return formatAmount(cellvalue, options, row);
                       }
    				},
    		   		{ name: 'proCount', width:150, align:"center",sortable:false,
   						 formatter:function(cellvalue, options, row) {
   		                   		return cellvalue==null?0:cellvalue;
   		                 }
    		   		},
    		   		{ name: 'recpCount', width:150, align:"center",sortable:false},
    		   		{ name: 'amount', width:197,align:"right" ,sortable:false,
                        formatter:function(cellvalue, options, row) {
                        	return formatAmount(cellvalue, options, row);
                        }
                    }
    		   	],
    			 rowNum: 0,
    		    // rowList: [10, 20, 50, 100],
    		     rownumbers: true,
    		    // pager: "#gridpage",
    		     viewrecords: true,
    		     caption:"&nbsp;",
    		     gridComplete: function(){
    		    	 $('tr.jqgfirstrow').find('td').eq(0).css('width',40+'px');
    				 $('#gridlist_rn').css('width',40+'px');
      			},
    		     jsonReader: {
    		         repeatitems: false,
    		         id: "ids"
    		     }
    		});
            
            $("#gridlist").jqGrid('navGrid', '#gridpage', { add: false, edit: false, del: false, search: false, refresh: false });
            $(window).trigger("resize");
            
        });
	
		//查询
        function gridSerch() {
        	var delDetailId = $.trim($("#delDetailId").val());
        	var goodsCode = $.trim($("#goodsCode").val());
    		$("#gridlist").jqGrid('setGridParam',{  
    	        datatype:'json',
    	        postData:{
    	        		"delDetailId":delDetailId,
    	        		"goodsCode":goodsCode},
    	        		page:1
    	    }).trigger("reloadGrid"); //重新载入  
    	}
</script>
</body>
</html>